package com.onec.service.api.exception;

import com.onec.service.api.enums.ResultCodeEnum;
import com.onec.service.api.enums.error.BusinessErrorEnum;
import com.onec.service.api.enums.error.RouteErrorEnum;

public class RouteException extends BaseException {

    public RouteException() {
    }

    public RouteException(ResultCodeEnum resultCodeEnum) {
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }

    public RouteException(RouteErrorEnum routeErrorEnum, String content) {
        this.code = routeErrorEnum.getCode();
        this.message = routeErrorEnum.getMessage() + content;
    }

    public RouteException(BusinessErrorEnum businessErrorEnum, String content) {
        this.code = businessErrorEnum.getCode();
        this.message = businessErrorEnum.getMessage() + content;
    }

    public RouteException(Integer code, String message) {
        super(code, message);
    }
}
